#define  _CRT_SECURE_NO_WARNINGS

#include <stdio.h>
void main(int argc, char* argv[])
{
    int i, sum = 0;
    FILE* fp;
    if (argc != 2)
    {
        printf("Command error,Usage: readfile filename\n");
        exit(1);
    }
    if (!(fp = fopen(argv[1], "rb")))
    {
        printf("The file %s can not be opened.\n", argv[1]);
        exit(1);
    }
    for (i = 1; i <= 10; i++) sum += getw(fp);
    printf("The sum is %d\n", sum);
    fclose(fp);

}